package threadlocal;

/**
 * @Classname Service3
 * @Description Service3
 * @Date 2024/1/14 21:59
 * @Author zhuzhenguo
 */
public class Service3 {
    public void process() {
        User user = UserContextHolder.holder.get();
        System.out.println("Service3拿到用户名：" + user.name);
        // 避免了内存泄漏的发生
        UserContextHolder.holder.remove();
    }
}
